<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/partFin/partFin" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="partFinList" />
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel" />
            <label >产品编码：</label>
            <input type="text" name="partName" value="${partName}" size="16" placeholder="产品编码"/>&nbsp;
            <label >产品名称：</label>
            <input type="text" name="partDesc" value="${partDesc}" size="16" placeholder="产品名称"/>&nbsp;
            <label >内部图号：</label>
            <input type="text" name="group3" value="${group3}" size="16" placeholder="内部图号"/>&nbsp;
            <label >订单号：</label>
            <input type="text" name="docId" value="${docId}" size="16" placeholder="订单号"/>&nbsp;
            <label >大组类：</label>
            <g:select name="totalGroup" from="${partFinTotalGroup}" data-toggle="selectpicker" data-live-search="true"
                  optionKey="total_group" optionValue="total_group" value="${totalGroup}" data-width="130" noSelection="['':'-- All --']" />
            <br /><br />
            <label >小分类：</label>
            <g:select name="detailCate" from="${partFinDetailCate}" data-toggle="selectpicker" data-live-search="true"
                  optionKey="detail_cate" optionValue="detail_cate" value="${detailCate}" data-width="130" noSelection="['':'-- All --']" />&nbsp;
            <label >订单状态：</label>
            <g:select name="startedState" from="${orderStatusAnalysisStartedList}" data-toggle="selectpicker" data-live-search="true"
                  optionKey="doc_status" optionValue="doc_state" value="${startedState}" data-width="130" noSelection="['':'-- All --']" />&nbsp;
            %{--<label >时间段：</label>&nbsp;
            <input type="text" name="startTime" value="${startTime}" data-pattern="yyyy/MM/dd"  data-toggle="datepicker" placeholder="FROM">
            <input type="text" name="endTime" value="${endTime}" data-pattern="yyyy/MM/dd" data-toggle="datepicker" placeholder="TO">&nbsp;&nbsp;--}%
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            %{--<button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm','${request.getContextPath()}/StageWip/exportExcel')" --}%
                    %{--data-icon="file-excel-o" title="导出Excel">导出</button>&nbsp;--}%
            <a type="button" class="btn btn-blue" href="${request.getContextPath()}/Base/exportExcel"
               data-toggle="doexport" data-confirm-msg="确定要导出吗？" data-icon="file-excel-o" title="导出Excel">导出</a>
        </div>
    </form>
</div>

<div class="bjui-pageContent tableContent">
    <g:if test="${list.size() > 0}">
        <table  data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr id="t1">
                <g:each in="${tableHeadList}" status="j" var="headInstance">
                    <g:if test="${headInstance!='RN'}">
                        <th width="125"><g:message code="${headInstance}" default="${headInstance}"/></th>
                    </g:if>
                </g:each>
            </tr>
            </thead>
            <tbody>
            <g:if test="${list.size()>0}">
                <g:each in="${list}" status="i" var="dataInstance">
                    <tr>
                        <g:each in="${tableHeadList}" status="j" var="headInstance">
                            <g:if test="${headInstance=='PART_NAME'||headInstance=='PART_DESC'||headInstance=='GROUP3'||headInstance=='TOTAL_GROUP'||headInstance=='DETAIL_CATE'||headInstance=='PART_DESC'||headInstance=='PART_DOC_QTY'||headInstance=='PART_WAITRAW_QTY'||headInstance=='PART_FIN_QTY'||headInstance=='PART_RUN_QTY'||headInstance=='STEP_NAME'||headInstance=='STEP_QTY'}">
                                <td>${dataInstance["${headInstance}"]}</td>
                            </g:if>
                            <g:else>
                                <td><a href="${request.getContextPath()}/PartFin/partFinStep?partName1=<%=dataInstance.PART_NAME%>&stepName1=<%=headInstance%>" data-toggle="navtab"  data-id="dialog-normal" data-options="{id:'partFinStep', title:'产品完成状态二阶'}">${dataInstance["${headInstance}"] }</a></td>
                            </g:else>
                        </g:each>
                    </tr>
                </g:each>
            </g:if>
            </tbody>
        </table>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel" />
    </g:else>
</div>
%{--<script>--}%
    %{--$(function(){--}%

        %{--var waitSum=0;--}%
        %{--var preSum=0;--}%
        %{--var runSum=0;--}%
        %{--var holdSum=0;--}%
        %{--var repairSum=0;--}%
        %{--var outsrcSum=0;--}%
        %{--var scrapSum=0;--}%
        %{--var finSum=0;--}%
        %{--var orderSum=0;--}%
        %{--for(var i=0;i<${orderStatusAnalysis.size()};i++){--}%

            %{--var wait='tdwait'+i--}%
            %{--var sumWait=$("td[name='"+wait+"']").text()==''?0:parseInt($("td[name='"+wait+"']").text())--}%
            %{--waitSum+=sumWait--}%
            %{--var run='tdrun'+i--}%
            %{--var sumRun=$("td[name='"+run+"']").text()==''?0:parseInt($("td[name='"+run+"']").text())--}%
            %{--runSum+=sumRun--}%
            %{--var hold='tdhold'+i--}%
            %{--var sumHold=$("td[name='"+hold+"']").text()==''?0:parseInt($("td[name='"+hold+"']").text())--}%
            %{--holdSum+=sumHold--}%
            %{--var repair='tdrepair'+i--}%
            %{--var sumRepair=$("td[name='"+repair+"']").text()==''?0:parseInt($("td[name='"+repair+"']").text())--}%
            %{--repairSum+=sumRepair--}%
            %{--var outsrc='tdoutsrc'+i--}%
            %{--var sumOutsrc=$("td[name='"+outsrc+"']").text()==''?0:parseInt($("td[name='"+outsrc+"']").text())--}%
            %{--outsrcSum+=sumOutsrc--}%
            %{--var scrap='tdscrap'+i--}%
            %{--var sumScrap=$("td[name='"+scrap+"']").text()==''?0:parseInt($("td[name='"+scrap+"']").text())--}%
            %{--scrapSum+=sumScrap--}%
            %{--var fin='tdfin'+i--}%
            %{--var sumFin=$("td[name='"+fin+"']").text()==''?0:parseInt($("td[name='"+fin+"']").text())--}%
            %{--finSum+=sumFin--}%
            %{--var order='tdorder'+i--}%
            %{--var sumOrder=$("td[name='"+order+"']").text()==''?0:parseInt($("td[name='"+order+"']").text())--}%
            %{--orderSum+=sumOrder--}%
            %{--var pre='tdpre'+i--}%
            %{--var sumPre=$("td[name='"+pre+"']").text()==''?0:parseInt($("td[name='"+pre+"']").text())--}%
            %{--preSum+=sumPre--}%
        %{--}--}%



        %{--$("td[name='waitSum']").html(waitSum);--}%
        %{--$("td[name='runSum']").html(runSum);--}%
        %{--$("td[name='holdSum']").html(holdSum);--}%
        %{--$("td[name='repairSum']").html(repairSum);--}%
        %{--$("td[name='outsrcSum']").html(outsrcSum);--}%
        %{--$("td[name='scrapSum']").html(scrapSum);--}%
        %{--$("td[name='finSum']").html(finSum);--}%
        %{--$("td[name='orderSum']").html(sumOrder);--}%
        %{--$("td[name='preSum']").html(preSum);--}%
        %{--$("td[name='orderSum']").html(orderSum);--}%
    %{--})--}%
%{--</script>--}%
